package com.zz.inner;

public class Outer {
    private int age=99;
    public static String count;
    //成员内部类
    public class Inner{
        private String name;
        private int age =66;
//        public static String schoolName;jdk16开始支持在内部类中定义静态成员

        public void test(){
            int age = 55;
            System.out.println(age);//访问局部变量age
            System.out.println(this.age);//内部类当前对象age
            System.out.println(Outer.this.age);//外部类age
        }
    }

    public static void main(String args[]){
        //创建内部类对象
        Outer.Inner in = new Outer().new Inner();
        in.test();
    }
}
